import { Video, VideoProps } from "@tarojs/components";
import styleSheet from "./index.module.scss";

interface AbstractVideoProps extends VideoProps {}

const AbstractVideo = (props: AbstractVideoProps) => {
  const {
    className,
    style,
    objectFit = "cover",
    autoplay = true,
    muted = true,
    loop = true,
  } = props;

  return (
    <Video
      className={className}
      controls={false}
      objectFit={objectFit}
      autoplay={autoplay}
      loop={loop}
      muted={muted}
      style={style}
      pageGesture={false}
      enableProgressGesture={false}
      {...props}
    />
  );
};

export default AbstractVideo;
